import java.util.Date;

public class Ex8_7{
	public static void main(String[] args){
		Account ac = new Account(1122, 20000);
		ac.setAnnualInterestRate(4.5);
		ac.withdraw(2500);
		ac.deposit(3000);
		System.out.printf("Balance: %.2f\n", ac.getBalance());
		System.out.printf("Monthly interest: %.2f%%\n", ac.getMonthlyInterestRate());
		System.out.printf("Created date: %s\n", ac.getDateCreated().toString());
	}
}

class Account{
	private int id = 0;
	private double balance = 0;
	private static double annualInterestRate = 0;
	private Date dateCreated;

	public Account(){
		dateCreated = new Date();
	}

	public Account(int i, double b){
		id = i;
		balance = b;
		dateCreated = new Date();
	}

	int getId(){
		return id;
	}

	void setId(int i){
		id = i;
	}

	double getBalance(){
		return balance;
	}

	void setBalance(double b){
		balance = b;
	}

	double getAnnualInterestRate(){
		return annualInterestRate;
	}

	void setAnnualInterestRate(double a){
		annualInterestRate = a;
	}

	Date getDateCreated(){
		return dateCreated;
	}

	double getMonthlyInterestRate(){
		return annualInterestRate / 12;
	}

	void withdraw(double m){
		balance -= m;
	}

	void deposit(double m){
		balance += m;
	}
}